package com.icloud.system.boot.dto;


import com.baomidou.mybatisplus.annotation.TableField;
import com.icloud.common.core.constant.ValidateConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@ApiModel("添加后台账户参数")
@Data
public class AddAdminUserDto {

    @ApiModelProperty("id,新增时为空，编辑时不可为空")
    private Long id;

    @ApiModelProperty("账号")
    @NotEmpty(message = ValidateConstant.NOT_NULL)
    private String username;

    @ApiModelProperty("昵称")
    @NotEmpty(message = ValidateConstant.NOT_NULL)
    private String nickname;

    @ApiModelProperty("登陆密码,新增时不能为空；修改时可为空，不为空时表示重置密码")
    private String password;

    @ApiModelProperty("角色ID 默认0表示总管理员，其余的必须绑定角色 role.id")
    @NotNull(message = ValidateConstant.NOT_NULL)
    private Long adminRoleId;

}
